5.6
MEDIUM CVSS 4.0
CVE-2026-43965
Path Traversal in build/packages/packages.toml Allows Arbitrary Directory Deletion
Description

Path traversal vulnerability in Gleam's dependency management allows arbitrary directory deletion via malicious build/packages/packages.toml content. Package keys read from build/packages/packages.toml by LocalPackages::read_from_disc are passed without validation to paths.build_packages_package(), which constructs a filesystem path by joining the project build directory with the attacker-controlled key. The resulting path is then passed to fs::delete_directory (which calls remove_dir_all). No check is performed to ensure the path remains within the intended build/packages/ directory. Both absolute paths and relative traversal sequences (e.g. ../) are accepted as package keys, allowing deletion of arbitrary directories. An attacker who can cause a victim to run gleam deps download on a project containing a malicious build/packages/packages.toml (e.g. by committing the normally-gitignored file to a repository) can cause arbitrary directories on the victim's system to be recursively deleted. This issue affects Gleam from 0.18.0-rc1 until 1.17.0.

INFO

Published Date :

June 2, 2026, 2:16 p.m.

Last Modified :

June 2, 2026, 4:16 p.m.

Remotely Exploit :

No

Source :

6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Affected Products

The following products are affected by CVE-2026-43965 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

No affected product recoded yet

CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 4.0 MEDIUM 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
CVSS 4.0 MEDIUM 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Solution
Update Gleam to a version that addresses the arbitrary directory deletion vulnerability.
  • Update Gleam to version 1.17.0 or later.
  • Ensure build/packages/packages.toml content is validated.
  • Remove malicious build/packages/packages.toml if present.
References to Advisories, Solutions, and Tools
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-43965 is associated with the following CWEs:

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-43965 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-43965 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Jun. 02, 2026

    Action Type Old Value New Value
    Added Reference https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3
  • New CVE Received by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

    Jun. 02, 2026

    Action Type Old Value New Value
    Added Description Path traversal vulnerability in Gleam's dependency management allows arbitrary directory deletion via malicious build/packages/packages.toml content. Package keys read from build/packages/packages.toml by LocalPackages::read_from_disc are passed without validation to paths.build_packages_package(), which constructs a filesystem path by joining the project build directory with the attacker-controlled key. The resulting path is then passed to fs::delete_directory (which calls remove_dir_all). No check is performed to ensure the path remains within the intended build/packages/ directory. Both absolute paths and relative traversal sequences (e.g. ../) are accepted as package keys, allowing deletion of arbitrary directories. An attacker who can cause a victim to run gleam deps download on a project containing a malicious build/packages/packages.toml (e.g. by committing the normally-gitignored file to a repository) can cause arbitrary directories on the victim's system to be recursively deleted. This issue affects Gleam from 0.18.0-rc1 until 1.17.0.
    Added CVSS V4.0 AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-22
    Added Reference https://cna.erlef.org/cves/CVE-2026-43965.html
    Added Reference https://github.com/gleam-lang/gleam/commit/690ca069817bee5f77a28fc3e360627c1da19291
    Added Reference https://github.com/gleam-lang/gleam/security/advisories/GHSA-jqvf-f6p2-wrv3
    Added Reference https://osv.dev/vulnerability/EEF-CVE-2026-43965
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.